package com.zhentao.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 快修店资质认证表
 * @TableName shop_certifications
 */
@TableName(value ="shop_certifications")
@Data
public class ShopCertifications implements Serializable {
    /**
     * 认证ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 快修店ID
     */
    private Long shopId;

    /**
     * 认证类型(品牌授权,技术认证,质量认证等)
     */
    private String certType;

    /**
     * 认证名称
     */
    private String certName;

    /**
     * 认证编号
     */
    private String certNumber;

    /**
     * 发证日期
     */
    private Date issueDate;

    /**
     * 到期日期
     */
    private Date expiryDate;

    /**
     * 证书图片URL
     */
    private String certImageUrl;

    /**
     * 状态(0-过期,1-有效)
     */
    private Integer status;

    /**
     * 创建时间
     */
    private Date createTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ShopCertifications other = (ShopCertifications) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getShopId() == null ? other.getShopId() == null : this.getShopId().equals(other.getShopId()))
            && (this.getCertType() == null ? other.getCertType() == null : this.getCertType().equals(other.getCertType()))
            && (this.getCertName() == null ? other.getCertName() == null : this.getCertName().equals(other.getCertName()))
            && (this.getCertNumber() == null ? other.getCertNumber() == null : this.getCertNumber().equals(other.getCertNumber()))
            && (this.getIssueDate() == null ? other.getIssueDate() == null : this.getIssueDate().equals(other.getIssueDate()))
            && (this.getExpiryDate() == null ? other.getExpiryDate() == null : this.getExpiryDate().equals(other.getExpiryDate()))
            && (this.getCertImageUrl() == null ? other.getCertImageUrl() == null : this.getCertImageUrl().equals(other.getCertImageUrl()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getShopId() == null) ? 0 : getShopId().hashCode());
        result = prime * result + ((getCertType() == null) ? 0 : getCertType().hashCode());
        result = prime * result + ((getCertName() == null) ? 0 : getCertName().hashCode());
        result = prime * result + ((getCertNumber() == null) ? 0 : getCertNumber().hashCode());
        result = prime * result + ((getIssueDate() == null) ? 0 : getIssueDate().hashCode());
        result = prime * result + ((getExpiryDate() == null) ? 0 : getExpiryDate().hashCode());
        result = prime * result + ((getCertImageUrl() == null) ? 0 : getCertImageUrl().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", shopId=").append(shopId);
        sb.append(", certType=").append(certType);
        sb.append(", certName=").append(certName);
        sb.append(", certNumber=").append(certNumber);
        sb.append(", issueDate=").append(issueDate);
        sb.append(", expiryDate=").append(expiryDate);
        sb.append(", certImageUrl=").append(certImageUrl);
        sb.append(", status=").append(status);
        sb.append(", createTime=").append(createTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}